/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bgu.sonar.util;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author bennyl
 */
public class Primitives {

    private static Map<Class, Class> primitiveClasses = new HashMap<>();

    static {
        primitiveClasses.put(int.class, Integer.class);
        primitiveClasses.put(short.class, Short.class);
        primitiveClasses.put(byte.class, Byte.class);
        primitiveClasses.put(char.class, Character.class);
        primitiveClasses.put(long.class, Long.class);
        primitiveClasses.put(double.class, Double.class);
        primitiveClasses.put(float.class, Float.class);
    }

    public static Class toBoxingClass(Class primitiveClass) {
        return primitiveClasses.get(primitiveClass);
    }
}
